package com.deke.home.controller;

import com.deke.entity.TbArticle;
import com.deke.home.service.ArticleManagementService;
import com.deke.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.annotation.Target;
import java.util.Map;

/**
 * @author ：ludi（206913808@qq.com）
 * @date ：Created in 2022/12/17 15:42
 * @description：文章管理
 * @modified By：
 * @version:
 */
@Api(tags = "文章管理")
@RestController
@RequestMapping("/home/article")
public class ArticleManagementController {

    @Autowired
    private ArticleManagementService articleManagementService;

    @ApiOperation(value = "根据id查询")
    @PostMapping("getArticleByNavId")
    public Result getArticleByNavId(@RequestBody Map map) {
        return articleManagementService.getArticleByNavId(map);
    }



    @ApiOperation(value = "根据id删除")
    @PostMapping("updateArticleByNavId")
    public Result updateArticleByNavId(@RequestBody TbArticle tbArticle) {
        return articleManagementService.updateArticleByNavId(tbArticle);
    }

}